home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Hardware / IDE-fix / c / InstallLS120 < prev    next >
Text File  |  1997-03-04  |  3KB  |  120 lines

  1. ;$VER: IDEfix InstallLS120 48.1 (24.02.97)
  2. ;Copyright ©1997 Elaborate Bytes, Oliver Kastl
  3.  
  4. (onerror
  5.     (makeassign "CacheCDFSInst" (safe))
  6.     (makeassign "CacheCDFS" (safe))
  7. )
  8.  
  9.  
  10. (complete 0)
  11.  
  12. (makeassign "CacheCDFSInst" "" ( safe) )
  13. (makeassign "CacheCDFS" "" ( safe) )
  14.  
  15.  
  16. (set #theirlevel @user-level )
  17.  
  18. (user 2)
  19.  
  20. (message "\n\nNow the FindDevice program will be launched to find "
  21.          "the Device and Unit of your LS-120 ATAPI Floppy..."
  22.          "\n\nYou may let the program scan for LS-120 units by clicking \"SCAN\"."
  23.          "\n\nChoose the device and unit and click \"USE\"!"
  24.          "\n\nIf FindDevice hangs: Reboot, start the installation again and "
  25.          "click CANCEL within FindDevice!")
  26.  
  27. (working "\n\nLaunching the FindDevice program to find "
  28.          "the Device and Unit of your LS120 ATAPI Floppy..."
  29.          "\n\nYou may let the program scan for LS-120 units by clicking \"SCAN\"."
  30.          "\n\nChoose the device and unit and click \"USE\"!"
  31.          "\n\nIf FindDevice hangs: Reboot, start the installation again and "
  32.          "click CANCEL within FindDevice!")
  33.  
  34. (set #Product ( run "CacheCDFSInst:FindDevice TYPE=0 ATAPI" ( safe ) ) )
  35.  
  36.  
  37. (if (= #Product 0 )
  38.     (
  39.     ( set #CDROM_Device (getenv "CDROM_Device" ))
  40.     ( set #CDROM_Unit (+ (getenv "CDROM_Unit" )))
  41.     ( set #CDROM_NumLuns (+ (getenv "CDROM_NumLuns" )))
  42.     )
  43.  
  44.     (
  45.     (set #CDROM_Device
  46.         (askstring
  47.             (prompt "\n\nWhat is the name for the exec device driver? " )
  48.             (default "scsi.device" )
  49.             (help "\n\nThis is the name of the device driver to use. "
  50.                     "The name is different for different configurations. "
  51.                     "\n\nConsult the manual of your SCSI/IDE host adapter "
  52.                     "if you don't know the name!" )
  53.         )
  54.     )
  55.  
  56.     (set #CDROM_Unit
  57.         (asknumber
  58.             (prompt "\n\nWhat is the Unit number of your LS-120 drive?" )
  59.             (default 5 )
  60.             (help "\n\nThis is the unit # of the LS-120 drive.  This is usually a "
  61.                     "numerical value between 0 and 7." )
  62.         )
  63.     )
  64.  
  65.     )
  66. )
  67.  
  68.  
  69. (user #theirlevel)
  70.  
  71. (protect "S:User-Startup" "srwed" )
  72.  
  73. (set #startupCommand (cat "MountLS120 DEVICE=" #CDROM_Device " UNIT=" #CDROM_Unit" QUIET\n") )
  74.  
  75. (startup "MountLS120"
  76.     (command #startupCommand )
  77.     (prompt "\n\nInserting IDEfix User Startup into the user-startup")
  78.     (help "\n\nInserting IDEfix User Startup into the user-startup")
  79. )
  80.  
  81. (complete 50 )
  82.  
  83.     (tooltype
  84.         (dest "CacheCDFS:LS120/MountLS120" )
  85.         (settooltype "DEVICE" #CDROM_Device )
  86.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  87.         (noposition)
  88.     )
  89.  
  90. (complete 100 )
  91.  
  92. (set #doMount
  93.     (askbool
  94.     (prompt "\n\nMount LS-120 floppy now ?")
  95.     (help "Select, if your ATAPI floppy should be mounted now, or not.")
  96.     (default 1)
  97.     )
  98. )
  99.  
  100. ( if @pretend ((set #doMount 0))) 
  101.  
  102. (if #doMount
  103.     (
  104.     (working "\n\nMounting LS-120...."
  105.              "\n\nPlease Wait!")
  106.  
  107.     ( run "MountLS120 DEVICE="#CDROM_Device" UNIT="#CDROM_Unit )
  108.     )
  109. )
  110.  
  111. (makeassign "CacheCDFSInst" (safe))
  112. (makeassign "CacheCDFS" (safe))
  113.  
  114. (user 2)
  115.  
  116. (message "\n\nLS-120 installed!" ) 
  117.  
  118. (exit (quiet ))
  119.  
  120.